#pragma once

#include <glad/glad.h>
#include <learnopengl/shader.h>
#include <learnopengl/camera.h>

class ParticleRenderer {
public:
    virtual ~ParticleRenderer() {
        delete m_pShader;
    }

    virtual void render(double vDeltaTime) = 0;

    virtual void setTexture(GLuint vTexID) {
        m_TexID = vTexID;
    }

    void setVAO(unsigned int vVAO) {
        m_VAO = vVAO;
    }

    void loadShader(const char* vertexPath, const char* fragmentPath, const char* geometryPath = nullptr) {
        m_pShader = new Shader(vertexPath, fragmentPath, geometryPath);
    }

    void setCamera(Camera* vCamera) {
        m_pCamera = vCamera;
    }

    static void saveGLStates() {}
    static void restoreGLStates() {}

protected:
    GLuint m_TexID;
    GLuint m_VAO;

    Shader* m_pShader;
    Camera* m_pCamera;

    int m_Width = 800;
    int m_Height = 600;
};